#include "header/pyramid_roompass_objects.h"
#include "header/pyramid_torch.h"

OSG_USING_NAMESPACE

NodePtr createRoompassObjects() {
	
	Matrix m;
	
	
	//roompassTorch1
	NodePtr roompassTorch1 = createTorch();
	//Transformation
	TransformPtr troompassTorch1 = Transform::create();
	beginEditCP(troompassTorch1, Transform::MatrixFieldMask);
		m.setIdentity();
		m.setTranslate(300/2, 42, 70-4.5);
		m.setRotate(Quaternion(Vec3f(0,1,0), +3.14159/2));
		troompassTorch1->setMatrix(m);
	endEditCP(troompassTorch1, Transform::MatrixFieldMask);
	
	NodePtr roompassTorch1Trans = Node::create();
	beginEditCP(roompassTorch1Trans, Node::CoreFieldMask | Node::ChildrenFieldMask);
		roompassTorch1Trans->setCore(troompassTorch1);
		roompassTorch1Trans->addChild(roompassTorch1);
	endEditCP(roompassTorch1Trans, Node::CoreFieldMask | Node::ChildrenFieldMask);
	
	
	
	// Erstellen eines Knotens
	NodePtr roompassObjects = Node::create();
	beginEditCP(roompassObjects, Node::CoreFieldMask);
	{
		roompassObjects->setCore(Group::create());
		roompassObjects->addChild(roompassTorch1Trans);
	}
	endEditCP  (roompassObjects, Node::CoreFieldMask);
	
	
	return roompassObjects;
}

